home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / graphvew / dta21pb.arj / DTA.DOC < prev    next >
Text File  |  1994-01-17  |  19KB  |  544 lines

  1.                    DTA (Dave's .TGA Animation Program)
  2.                           Rel 2.0.7 (09/30/93)
  3.            Copyright (c) 1991, 1992, 1993, 1994 by David K. Mason
  4.  
  5.   DTA is a command-line utility for creating Autodesk Animator .FLI
  6.   and .FLC animation files from:
  7.  
  8.   o .TGA files as created by the POV-Ray and POLYRAY ray-tracers.
  9.   o .IMG files as created by the Vivid ray-tracer.
  10.   o .PCX files.
  11.   o .DIB or .BMP files
  12.   o .GIF files.
  13.   o Other .FLI or .FLC files.
  14.   o VistaPro .VAN animation files
  15.   o Presidio .ANI animation files
  16.  
  17.   DTA can also perform a wide range of post-processing functions
  18.   on image files including:
  19.  
  20.   o Creating a single optimal 256-color palette from a series of
  21.     truecolor pictures, and then creating an Autodesk Animator .FLI
  22.     file out of them.
  23.   o Saving the palette as a .MAP (PICLAB, FRACTINT) or .COL
  24.     (Autodesk Animator) palete file.
  25.   o Convert pictures to .GIF, .TGA, .PCX, .BMP graycale .TIF
  26.     still image files.
  27.   o Reading in a palette file in either .COL or .MAP format
  28.     and animating a bunch of pictures using that palette.
  29.   o Arbitrary rotation.
  30.   o Scaling.
  31.   o Multi-layer compositing.
  32.   o Averaging images together for a variety of effects, including
  33.     simulated motion blur and red/blue 3D.
  34.   o And more.
  35. ----------------------------------------------------------------------
  36. **** IF YOU ARE HAVING MEMORY PROBLEMS WITH DTA, READ THIS ****
  37.  
  38. Real mode vs. Protected mode:
  39.  
  40.   DTA used to come in two varieties: a real mode version and
  41.   a protected mode version.  From now on there's only a
  42.   protected mode version.  There's no more DTAX.EXE.
  43.  
  44.   DTA will let you access up to 16MB of extended memory (either raw
  45.   or configured as XMS with HIMEM.SYS or QEMM386.SYS or whatever).
  46.   It requires at least 1 or 2 MB of RAM to run at all.
  47.  
  48.   Don't delete the files DPMI16BI.OVL, RTM.EXE, and DPMIINST.EXE.
  49.   These make up the protected mode drivers for Borland Pascal 7.0
  50.   (the compiler used to build DTA).  DTA won't run without them.
  51.  
  52. ----------------------------------------------------------------------
  53. The Rules:
  54.  
  55.   Feel free to re-upload this program to other bulletin board
  56.   systems in its *original, unmodified* form.  You may not
  57.   repackage it with other programs.  You may not repackage it with
  58.   your own tutorial.  I feel like an idiot having to make these
  59.   demands, but I've been finding archives on BBSs going by
  60.   names like MORPHPAK.ZIP which are collections of DTA, my other
  61.   program DMorf, sometimes also Richard Godoeken's program
  62.   RMORPH, plus Trilobyte's PLAY.  That's not kosher.  I and those
  63.   other folks distributed our programs the way we did for
  64.   reasons.
  65.     Do not include this program on a disk along with any magazine,
  66.   book, hardware product, or other software product without my
  67.   permission.
  68.     If you place this program on an Internet FTP site, please drop
  69.   me a note (76546.1321@compuserve.com) so I'll know how to answer
  70.   when people ask me "Where can I find DTA on the net?"
  71.  
  72. ----------------------------------------------------------------------
  73. Syntax:
  74.  
  75.   DTA (filenames) (switches)
  76.  
  77. ----------------------------------------------------------------------
  78. Input Formats:
  79.  
  80.   .TGA        Targa 16-,24-,32-bit compressed/uncompressed,
  81.               or 8-bit grayscale uncompressed.
  82.   .GIF        GIF (87a or 89a, but NO interlacing).
  83.   .PCX        PC Paintbrush 256-color or 24-bit PCX images.
  84.   .DIB/.BMP   Microsoft Windows device-independent bitmap files.
  85.   .IMG        Vivid raytracer 24-bit RLE output.
  86.   .FLI and
  87.   .FLC        Autodesk Animator/Animator Pro animation files.
  88.   .VAN        VRLI VistaPro 256-color animation files.
  89.   .ANI        Presidio PC Animate Plus animation files.
  90.   .RLE        MindImage 2 SIRDS run-length encoded depth
  91.               files.
  92.  
  93.   .LZH        LHArc compressed archive containing files in the above
  94.               picture formats.
  95.   .ZIP        PKZIP compressed archive containing files in the above
  96.               picture formats.
  97.   .ARJ        ARJ compressed archive containing files in the above
  98.               picture formats.
  99.  
  100.   @script     Process all files listed in a text file called
  101.               "script.SCR".
  102. ----------------------------------------------------------------------
  103. Switches:
  104.  
  105. (This list isn't complete... type "DTA" with no parameters for
  106. a more recent list.  That list might be missing a few, too, so
  107. check WHATSNEW.DTA)
  108.  
  109. (Output options)
  110.  
  111.   /O[name]    Specify an output filename.
  112.  
  113.   /FF         Create a .FLI animation file. [default]
  114.   /FM         Create a PICLAB .MAP palette file.
  115.   /FC         Create an Autodesk Animator .COL palette file.
  116.   /FB         Create .BMP file[s].
  117.   /FG         Create .GIF file[s].
  118.   /FP         Create .PCX file[s].
  119.   /FT         Create new .TGA file[s].
  120.   /FI         Create grayscale TIFF files
  121.  
  122. (Targa Output options)
  123.  
  124.   /NC         Do NOT compress .TGA file
  125.   /B##        Number of bits per pixel in TGA ( 8/16/*24*/32 )
  126.               or FLIC (*8/16).  (If you specify /b16 for a flic
  127.               you'll get a Tempra FLX instead of a FLI or FLC.)
  128.  
  129. (.FLI output options)
  130.  
  131.   /P           Play in ping-pong, or pendulum, oscillation order.
  132.   /Snnn        Specify display speed of animation playback (default=0).
  133.   /R[#]        Specify resolution:
  134.                  1 = 320x200 [default]
  135.                  2 = 320x240
  136.                  3 = 320x400
  137.                  4 = 320x480
  138.                  5 = 360x480
  139.                  6 = 640x480
  140.                  7 = N/A
  141.                  8 = 800X600
  142.                  9 = N/A
  143.                 10 = 1024x768
  144.                 11 = N/A
  145.                 12 = 1280x1024
  146.   /RA          Base resolution on the size of the first input
  147.                file.
  148.   /R#,#        Specify exact resolution.
  149.  
  150. (Palette options)
  151.   /G           Use 64-level greyscale instead of a palette.
  152.   /G32         Use 32-level greyscale insted of a palette.
  153.   /332         Use 3/3/2 palette.
  154.   /Upalname    Use existing .MAP or .COL file for palette.
  155.   /M#          Set maximum internal colors.
  156.   /MN          Do NOT remap colormapped input.
  157.   /PO          Force single optimal palette generation even when
  158.                creating GIF files.
  159.   /C#          Scan only one frame per # for palette.
  160.  
  161. (Dithering options)
  162.   /DF          Dither with Floyd-Steinberg filter.
  163.   /DS          Dither with Sierra-Lite filter.
  164.   /DO[1-6]     Ordered dither  (digit represents dither strength).
  165.   /DR#         Random noise dither (digit represents dither strength).
  166.  
  167. (Other options)
  168.   /L           Separates output layers.  Picture files specified
  169.                in later layers get overlayed on top of previous
  170.                layers.  If the overlayed pictures contain transparency
  171.                informations (32-bit TGA files only), then the
  172.                pictures underneath will show through.
  173.   /K#          Use only one frame per # picture files.  Skip the rest.
  174.   /A[#|A]      Average <number> TGAs per output frame (A=All).
  175.   /T[#|A]      Trail   <number> TGAs per output frame (A=All).
  176.   /X[num]      eXpand <number>. Create and insert <number> averaged.
  177.                frames between each pair of regular frames.
  178.   /GA#         Gamma-correct picture.  Try specifying a number
  179.                between 1.0 and 2.0 to brighten, between 0.5 and
  180.                1.0 to darken.
  181.   /SC[#,#]     Rescale pictures to screen resolution.
  182.   /CL[#,#,#,#] Clip the input picture.  The first two numbers
  183.                specify the top-left, and the other two numbers
  184.                control the width and depth.
  185.   /CK#,#,#     Chroma-key, to make all occurrences of a color
  186.                transparent for compositing.  The three numbers
  187.                represent the red,green, and blue components
  188.                of the key color.
  189.   /CT#         Chroma-key tolerance.  Specifies how close to the
  190.                key color a pixel has to be to make it transparent.
  191.  
  192. ----------------------------------------------------------------------
  193. Scripts:
  194.  
  195.   As I mentioned earlier, you tell DTA to process all the files
  196.   listed in a text file by specifying the name of the text file
  197.   preceded by a "@".
  198.     A script file can contain as many file specifications
  199.   as you want.  It can also contain any of the above-mentioned
  200.   switches.  Each must be on a line of its own.
  201.     Here's an example script called test.scr:
  202.  
  203.      back.tga
  204.      /l
  205.      *.tga
  206.      /a2
  207.      /sc640,480
  208.      /l
  209.      signat.gif
  210.      /lr
  211.      /lb
  212.      /fo2
  213.  
  214.     Typing "dta @test" in this case would cause DTA to perform
  215.   exactly the same as if you instead typed:
  216.  
  217.      dta back.gif /l *.tga /a2 /sc640,480 /l signat.gif /lr /lb /fo2
  218.  
  219.     Scripts can come in handy if
  220.  
  221.     (a) your command is just getting too darn long and
  222.   complicated to fit on a DOS command line.  A script can
  223.   be as long as you want.
  224.     (b) you have to use the same command over and over
  225.   again.  Why remember all that stuff or use a crib sheet
  226.   when you can just put it all in a script just once
  227.   and then use it over and over.
  228.  
  229.     You can also use a script in addition to other filenames
  230.   and switches:
  231.  
  232.     Say you had a script file called whirl.scr that looked like
  233.   this:
  234.  
  235.      /l
  236.      logo.gif
  237.      /rot0,0
  238.      /rot360,100
  239.      /ch0,0,0
  240.      /loc400,350
  241.  
  242.     then instead of typing
  243.  
  244.      dta x*.tga /l logo.gif /rot0,0 /rot360,100 /ch0,0,0 /loc400,350
  245.  
  246.     you could just type:
  247.  
  248.      dta x*.tga @whirl
  249.  
  250. ----------------------------------------------------------------------
  251. Revision History:
  252.  
  253.   (see WHATSNEW.DTA)
  254.  
  255. ----------------------------------------------------------------------
  256. Averaging/Trailing/Expansion modes (/A /T /X switches) examples:
  257.  
  258.   Averaging 5 input pictures with "/A2" option:
  259.  
  260.     Average:    To produce:
  261.  
  262.     file 1      frame 1
  263.     file 2
  264.  
  265.     file 3      frame 2
  266.     file 4
  267.  
  268.     file 5      frame 3
  269.     file 1
  270.  
  271.   Trailing 4 input pictures with "/T2" option:
  272.  
  273.     Average:    To produce:
  274.  
  275.     file 1      frame 1
  276.     file 2
  277.  
  278.     file 2      frame 2
  279.     file 3
  280.  
  281.     file 3      frame 3
  282.     file 4
  283.  
  284.     file 4     frame 4
  285.     file 1
  286.  
  287.   Trailing 5 input pictures with "/T3" option:
  288.  
  289.     Average:    To produce:
  290.  
  291.     file 1      frame 1
  292.     file 2
  293.     file 3
  294.  
  295.     file 2      frame 2
  296.     file 3
  297.     file 4
  298.  
  299.     file 3      frame 3
  300.     file 4
  301.     file 1
  302.  
  303.     file 4      frame 4
  304.     file 5
  305.     file 1
  306.  
  307.     file 5      frame 5
  308.     file 1
  309.     file 2
  310.  
  311.   Expanding 2 input pictures with "/X1" option:
  312.  
  313.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  314.     frame 2 =  ( 50% of FILE 1  ) + ( 50% of FILE 2  )
  315.     frame 3 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  316.  
  317.   Expanding 2 input pictures with /X2" option:
  318.  
  319.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  320.     frame 2 =  ( 66% of FILE 1  ) + ( 33% of FILE 2  )
  321.     frame 3 =  ( 33% of FILE 1  ) + ( 66% of FILE 2  )
  322.     frame 4 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  323.  
  324. ----------------------------------------------------------------------
  325. Miscellaneous examples:
  326.  
  327. DTA ROCKET*.TGA /FC /OROCKET
  328.  
  329. Make a palette for all .TGA files starting with "ROCKET".
  330. Output the palette to an Animator palette file called "ROCKET.COL".
  331.  
  332. DTA SKY.GIF /L BEFORE.TGA MORF*.TGA AFTER.TGA
  333.  
  334. Build a multilayer flic.  SKY.GIF gets put in the background, and
  335. the pictures FIRST.TGA, a bunch of TGAs beginning with the string
  336. MORF, and LAST.TGA get superimposed over it.  SKY.GIF shows through
  337. any parts of the other pictures which are transparent.
  338.  
  339. This example assumes that the pictures BEFORE.TGA and AFTER.TGA
  340. had transparency added to them with my other program, DMorf
  341. (Rel. 1.1 or higher), and that the MORF*.TGA files are morphed
  342. pictures built with DMorf.
  343.  
  344. DTA PIC1 PIC2 PIC3 /FM /OXYZ
  345.  
  346. Make a palette for .TGA files "PIC1.TGA", "PIC2.TGA", and "PIC3.TGA"
  347. Output the palette to a PICLAB palette file called "XYZ.MAP".
  348.  
  349. DTA ROCKET* /OROCKET /DF
  350.  
  351. Make input from all .TGA files beginning with "ROCKET".
  352. Output to an animation file called "ROCKET.FLI".
  353. Dither the frames.
  354.  
  355. DTA ROCKET* /G /DO2 /P
  356.  
  357. Make input from all .TGA files beginning with "ROCKET".
  358. Map colors to grayscale.
  359. Dither, using ordered dither strength 2.
  360. Ping-pong it.
  361. Output to an animation with the default name of "ANIM.FLI"
  362.  
  363. DTA ROCKET
  364.  
  365. Make input from ROCKET.TGA.
  366. Output to an animation with the default name of "ANIM.FLI".
  367.  
  368. DTA @WING2.LST /S10 /OWING2.FLI
  369.  
  370. Make input from files listed in a text file called "WING2.LST".
  371. Set playback speed to "10".
  372. Output to an animation with the name of "WING2.FLI".
  373.  
  374. DTA BBB*.TGA AAA*.TGA /UPAL1.COL /UPAL2.MAP /OFRED
  375.  
  376. Make input from all .TGA files whose name begins with "BBB", and "AAA".
  377. NOTE:
  378.     The "BBB" files will appear in the animation before the "AAA" files.
  379.     The "BBB" files will be sorted alphabetically, and so will the
  380.     "AAA" files, but separately.
  381. Read in an Animator palette file called "PAL1.COL", and merge it with
  382.     a Piclab palette file called "PAL2.MAP".
  383.     Use this combined palette for the animation.
  384. Output to an animation with the name of "FRED.FLI".
  385.  
  386. DTA *.TGA /FG
  387.  
  388. Make .GIFs from all .TGAs in the current directory.
  389.  
  390. DTA SOMBRERO /FG /DR2 /G
  391.  
  392. Make a dithered grayscale .GIF from a file called SOMBRERO.TGA.
  393.  
  394. DTA LEFT*.TGA RGHT*.TGA /3D
  395.  
  396. Make a red/blue 3D .FLI file .
  397. Use the .TGA files beginning with "LEFT" as the red component
  398. And the ones beginning with "RGHT" as the blue component.
  399. NOTE: For this to work right, there must be an equal number of
  400.    "LEFT" and "RGHT" .TGAs.
  401. Output to an animation with the default filename of "ANIM.FLI"
  402.  
  403. DTA XXX* /FTYY /AA
  404.  
  405. Make input from .TGAs beginning with "XXX".
  406. Average all files.
  407. Output to a new Targa file called "YY.TGA".
  408. NOTE: averaging will work with up to 10 files, but no more.
  409.  
  410. DTA XXX*.TGA /T3 /DO3 /OZZZ
  411.  
  412. Make input from all .TGA files beginning with "XXX"
  413. Trail 3 frames.
  414. Use ordered dithering, strength 3.
  415. Output an animation called "ZZZ.FLI"
  416.  
  417. DTA XXX*.TGA /X3
  418.  
  419. Make input from all .TGA files beginning with "XXX"
  420. Expand 3.  Assuming 5 .TGA input files, this would create a 15 frame
  421. animation.
  422. Output an animation called "ANIM.FLI"
  423.  
  424. DTA *.GIF
  425.  
  426. Creates a file called ANIM.FLI or ANIM.FLC from all .GIF files in the
  427. current directory.  (The extension depends on the resolution of the
  428. first picture.  If it's 320 by 200, then DTA will create a .FLI
  429. file.  Otherwise, it'll create a .FLC.
  430.  
  431. DTA *.TGA /K2 /C2
  432.  
  433. Assuming 60 .TGA files, create a flic containing only 30 frames.
  434. Generate the palette from only 15 frames.
  435.  
  436. DTA *.GIF /R320,200 /SC
  437.  
  438. Create a flic from a bunch of GIF files, set the screen size
  439. to 320 by 200, and rescale all the images to the screen size.
  440.  
  441. DTA *.TGA /R6 /SC320,240
  442.  
  443. Create a 640x480 FLC file from a bunch of TGA files.  Rescale each
  444. picture so that the width is depth is 240, but leave the width alone.
  445. This one is useful when you want to turn a bunch of 320x200
  446. pictures into a 640x480 flic... because 320x200 screens use a
  447. different aspect ratio than 640x480.  320x200 pictures look a
  448. bit squat when you display them in 640x480 mode, but 320x240 looks
  449. correct.
  450.  
  451. DTA FLIC1.FLI FLIC2.FLI /OFLIC3
  452.  
  453. Create a new flic by appending two existing flics.  Unlike my old
  454. FLAP program, DTA will create a new palette.
  455.  
  456. DTA FLIC.FLI /FG /NM
  457.  
  458. Create GIF files from the frames in FLIC.FLI.  The /NM tells DTA
  459. *not* to generate an optimized palette.  That would be a waste of
  460. time, since a FLIC file usually contains an optimized palette.
  461.  
  462. ----------------------------------------------------------------------
  463. Speed concerns:
  464.  
  465.   DTA is fastest when you use grayscale instead of a palette.
  466.  
  467.   If you let DTA generate its own palette, DTA is still
  468.   relatively speedy.  It gets (lots) slower if you dither.
  469.  
  470.   If you create an animation from .TGA files stored in an
  471.   archive file (.LZH, .ZIP, .ARJ), then DTA is REAL slow, because
  472.   it takes time to shell out to the de-archiving program.
  473.   ZIP files compress the least, but PKUNZIP is the fastest
  474.   dearchiver.  ARJ files compress really well, but the dearchiver
  475.   is the slowest.  LZH files compress well, but not as well as
  476.   ARJ, and LHA's speed is somewhere between ARJ and PKUNZIP.
  477.  
  478.   If you average multiple files or rescale pictures, that is going
  479.   to slow things down.
  480.  
  481. ----------------------------------------------------------------------
  482. Credits:
  483.  
  484.   To create palettes and select colors from palettes, this
  485.   program uses an algorithm that I found in an article called "A
  486.   Simple Method for Color Quantization:  Octree Quantization," by
  487.   Michael Gervautz and Werner Purgathofer, which can be found in
  488.   a book called "Graphics Gems," edited by Andrew S. Glassner.  I
  489.   recommend this book highly.
  490.  
  491.   The .FLI file format was explained in a document called
  492.   FLIDOC.TXT from Jim Kent's FLILIB.  I wasn't able to use this C
  493.   library in DTA, since I do my coding in Pascal, but the
  494.   document contained all the info I needed.  (Jim Kent is also
  495.   the guy who, with Tom Hudson, wrote TGAFLI, and who developed
  496.   Animator and Animator Pro.)
  497.  
  498.   More thanks to Jim Kent for his info about 640x480 .FLIs on
  499.   BIX.
  500.  
  501.   Thanks to Dan Farmer, Alexander Enzmann, Jeff Bowermaster,
  502.   and others for their excellent suggestions.
  503.  
  504.   Thanks to Dan Farmer for sprucing up this documentation
  505.   file.
  506.  
  507.   Thanks to Tim Wegner for talking me into finally adding GIF89a
  508.   input.
  509.  
  510.   Thanks to the Cafe Pamplona in Harvard Square for being such
  511.   a cool place to swill coffee and discuss ray-tracing and animation.
  512.  
  513. ----------------------------------------------------------------------
  514. Disclaimer:
  515.  
  516.   If you use DTA, you do so at your own risk.  I won't be held
  517.   responsible if it screws anything up.
  518.  
  519. ----------------------------------------------------------------------
  520. Support:
  521.  
  522.   If you've got any requests/bug reports/suggestions, send a message
  523.   to:
  524.     "David Mason" on the "You Can Call Me Ray" BBS, (708) 358-5611,
  525.     and on "The Graphics Alternative", (510) 524-2780,
  526.     and on "Channel 1" BBS, (617) 354-8873.
  527.     "76546,1321" on Compuserve.
  528.  
  529.   You'll probably get some kind of a response (maybe sooner, maybe
  530.   later)
  531.  
  532. ----------------------------------------------------------------------
  533. Money matters:
  534.  
  535.   DTA is a shareware program.  If you think this program is worth
  536.   it, send some money or some computer hardware or something to:
  537.  
  538.     David K. Mason
  539.     P.O. Box 181015
  540.     Boston, MA 02118
  541.  
  542.   I think $35 is an appropriate amount, but feel free to send more
  543.   or less.
  544.